{extends file="base.html"}

{block name="head"}
<div id="header">
    <div class="wrap clearfix">
        <div class="logo"><a href="{call index_link}"><img  src="{$absroot}images/logo-1.png" alt="{setting('sitr_title')}"  width="94"/></a></div>
        <div id="Menu">
            <ul class="layui-nav" lay-filter="">
                <li class="layui-nav-item {if $is_index}layui-this{/if}"><a href="{call index_link}">首页</a></li>                
                {foreach menu('nav') as $level1_id=>$level1}
                <li class="layui-nav-item {if $top_id==$level1_id}layui-this{/if}">
                    <a href="{call menu_link id=$level1_id}">{menu($level1_id,'title')}</a>
                    {if $level1}
                    <dl class="layui-nav-child">
                    {foreach $level1 as $level2_id=>$level2}
                        <dd><a href="{call menu_link id=$level2_id}">{menu($level2_id,'title')}</a></dd>
                    {/foreach}
                    </dl>
                    {/if}
                </li>
                {/foreach}
                {if !$login}
                <li class="layui-nav-item"><a href="{url('/login')}">登录</a></li>
                <li class="layui-nav-item"><a href="{url('manage/User/register')}">注册</a></li>
                {else}
                <li class="layui-nav-item"><a href="{url('manage/User/Index')}">用户中心</a></li>
                <li class="layui-nav-item"><a href="{url('manage/User/logout')}">退出</a></li>
                {/if}
            </ul>
        </div>        
        <div class="menuBar" >
            <ul class="list">
                <li class="bar_line bar_top"></li>
                <li class="bar_line bar_mid"></li>
                <li class="bar_line bar_foot"></li>
            </ul>
        </div>
        <div id="mMenu">
            <ul class="list">
                <li class="{if !$top_id}current{/if}"><a href="{call index_link}">首页</a></li>                
                {foreach menu('nav') as $level1_id=>$level1}
                <li class="{if $top_id==$level1_id}current{/if}">
                    <a href="{call menu_link id=$level1_id}">{menu($level1_id,'title')}</a>
                </li>
                {/foreach}   
            </ul>
        </div>        
    </div>
</div>
{/block}
{block name="foot"}
<div id="footer">
    <div class="wrap">
        <div  class="link">
            {foreach $query_data[11] as $item}{strip}
            <a href="{furl($item.link)}" target="_blank">{$item.title}</a>{if !$item@last}<em>|</em>{/if}
            {/strip}{/foreach}
        </div>
        <div class="foot en-font">
        <span>{setting('site_copyright')}</span><span>{setting('icp')}</span>
        </div>
    </div>
</div>
<script>
layui.use('element', function(){
    var element = layui.element;
});

$('.menuBar').click(function(){
    $('#header').toggleClass('menu_close');
})


</script>
{/block}